package com;
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
<<<<<<< HEAD

public class BB {
    public static void main(String[] args) {
        System.out.println("BB...............");
=======
>>>>>>> 5f1c2bd5734eb567276160ebb97c613e840ec365
>>>>>>> 5dbb7caba63e6f68aaf9d1c758f8fb52b95cac17
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

public class BB {
    public static void main(String[] args) {
/*
        List<String> stringList=new ArrayList<String>(Arrays.asList("a","a","f","f","d","d","c","b","c"));
        Map<String, Long> collect = stringList.stream().collect(Collectors.groupingBy(
                Function.identity(),
                Collectors.counting()
        ));
        stringList.stream().distinct().forEach(f->{
            if(collect.get(f)>1){
                System.out.println(f);
            }
        });*/


        List<String> stringList1=new ArrayList<String>(Arrays.asList("a","b","c","d","e"));
        List<String> stringList2=new ArrayList<String>(Arrays.asList("a","b1","c","d1","e"));
        stringList1.stream().forEach(f->{
            stringList2.stream().forEach(ff->{
                if(f.equals(ff)){
                    System.out.println(ff);
                }
            });
        });


<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
>>>>>>> c43f0d061f05c07ee1142a2757d7bfae8037f359
>>>>>>> 5f1c2bd5734eb567276160ebb97c613e840ec365
>>>>>>> 5dbb7caba63e6f68aaf9d1c758f8fb52b95cac17
    }
}
